Integrand size = 33, antiderivative size = 262 \[ \int \frac {\cos ^2(c+d x) (A+B \cos (c+d x))}{(a+b \cos (c+d x))^{3/2}} \, dx=\frac {2 \left (6 a^2 A b-3 A b^3-8 a^3 B+5 a b^2 B\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^3 \left (a^2-b^2\right ) d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {2 \left (6 a A b-8 a^2 B-b^2 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{3 b^3 d \sqrt {a+b \cos (c+d x)}}-\frac {2 a^2 (A b-a B) \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 B \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{3 b^2 d} \]
-2*a^2*(A*b-B*a)*sin(d*x+c)/b^2/(a^2-b^2)/d/(a+b*cos(d*x+c))^(1/2)+2/3*B*s in(d*x+c)*(a+b*cos(d*x+c))^(1/2)/b^2/d+2/3*(6*A*a^2*b-3*A*b^3-8*B*a^3+5*B* a*b^2)*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticE(sin(1/2*d *x+1/2*c),2^(1/2)*(b/(a+b))^(1/2))*(a+b*cos(d*x+c))^(1/2)/b^3/(a^2-b^2)/d/ ((a+b*cos(d*x+c))/(a+b))^(1/2)-2/3*(6*A*a*b-8*B*a^2-B*b^2)*(cos(1/2*d*x+1/ 2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticF(sin(1/2*d*x+1/2*c),2^(1/2)*(b/( a+b))^(1/2))*((a+b*cos(d*x+c))/(a+b))^(1/2)/b^3/d/(a+b*cos(d*x+c))^(1/2)
Time = 1.47 (sec) , antiderivative size = 189, normalized size of antiderivative = 0.72 \[ \int \frac {\cos ^2(c+d x) (A+B \cos (c+d x))}{(a+b \cos (c+d x))^{3/2}} \, dx=\frac {2 \left (\frac {\sqrt {\frac {a+b \cos (c+d x)}{a+b}} \left (\left (6 a^2 A b-3 A b^3-8 a^3 B+5 a b^2 B\right ) E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )+(a-b) \left (-6 a A b+8 a^2 B+b^2 B\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )\right )}{a-b}+b \left (\frac {a \left (3 a A b-4 a^2 B+b^2 B\right )}{-a^2+b^2}+b B \cos (c+d x)\right ) \sin (c+d x)\right )}{3 b^3 d \sqrt {a+b \cos (c+d x)}} \]
(2*((Sqrt[(a + b*Cos[c + d*x])/(a + b)]*((6*a^2*A*b - 3*A*b^3 - 8*a^3*B + 5*a*b^2*B)*EllipticE[(c + d*x)/2, (2*b)/(a + b)] + (a - b)*(-6*a*A*b + 8*a ^2*B + b^2*B)*EllipticF[(c + d*x)/2, (2*b)/(a + b)]))/(a - b) + b*((a*(3*a *A*b - 4*a^2*B + b^2*B))/(-a^2 + b^2) + b*B*Cos[c + d*x])*Sin[c + d*x]))/( 3*b^3*d*Sqrt[a + b*Cos[c + d*x]])
Time = 1.44 (sec) , antiderivative size = 280, normalized size of antiderivative = 1.07, number of steps used = 15, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.455, Rules used = {3042, 3467, 27, 3042, 3502, 27, 3042, 3231, 3042, 3134, 3042, 3132, 3142, 3042, 3140}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos ^2(c+d x) (A+B \cos (c+d x))}{(a+b \cos (c+d x))^{3/2}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^2 \left (A+B \sin \left (c+d x+\frac {\pi }{2}\right )\right )}{\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^{3/2}}dx\) |
\(\Big \downarrow \) 3467 |
\(\displaystyle \frac {2 \int \frac {b \left (a^2-b^2\right ) B \cos ^2(c+d x)+\left (2 a^2-b^2\right ) (A b-a B) \cos (c+d x)+a b (A b-a B)}{2 \sqrt {a+b \cos (c+d x)}}dx}{b^2 \left (a^2-b^2\right )}-\frac {2 a^2 (A b-a B) \sin (c+d x)}{b^2 d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \frac {b \left (a^2-b^2\right ) B \cos ^2(c+d x)+\left (2 a^2-b^2\right ) (A b-a B) \cos (c+d x)+a b (A b-a B)}{\sqrt {a+b \cos (c+d x)}}dx}{b^2 \left (a^2-b^2\right )}-\frac {2 a^2 (A b-a B) \sin (c+d x)}{b^2 d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {b \left (a^2-b^2\right ) B \sin \left (c+d x+\frac {\pi }{2}\right )^2+\left (2 a^2-b^2\right ) (A b-a B) \sin \left (c+d x+\frac {\pi }{2}\right )+a b (A b-a B)}{\sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{b^2 \left (a^2-b^2\right )}-\frac {2 a^2 (A b-a B) \sin (c+d x)}{b^2 d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {\frac {2 \int \frac {\left (-2 B a^2+3 A b a-b^2 B\right ) b^2+\left (-8 B a^3+6 A b a^2+5 b^2 B a-3 A b^3\right ) \cos (c+d x) b}{2 \sqrt {a+b \cos (c+d x)}}dx}{3 b}+\frac {2 B \left (a^2-b^2\right ) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{3 d}}{b^2 \left (a^2-b^2\right )}-\frac {2 a^2 (A b-a B) \sin (c+d x)}{b^2 d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {\int \frac {\left (-2 B a^2+3 A b a-b^2 B\right ) b^2+\left (-8 B a^3+6 A b a^2+5 b^2 B a-3 A b^3\right ) \cos (c+d x) b}{\sqrt {a+b \cos (c+d x)}}dx}{3 b}+\frac {2 B \left (a^2-b^2\right ) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{3 d}}{b^2 \left (a^2-b^2\right )}-\frac {2 a^2 (A b-a B) \sin (c+d x)}{b^2 d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \frac {\left (-2 B a^2+3 A b a-b^2 B\right ) b^2+\left (-8 B a^3+6 A b a^2+5 b^2 B a-3 A b^3\right ) \sin \left (c+d x+\frac {\pi }{2}\right ) b}{\sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{3 b}+\frac {2 B \left (a^2-b^2\right ) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{3 d}}{b^2 \left (a^2-b^2\right )}-\frac {2 a^2 (A b-a B) \sin (c+d x)}{b^2 d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3231 |
\(\displaystyle \frac {\frac {\left (-8 a^3 B+6 a^2 A b+5 a b^2 B-3 A b^3\right ) \int \sqrt {a+b \cos (c+d x)}dx-\left (a^2-b^2\right ) \left (-8 a^2 B+6 a A b-b^2 B\right ) \int \frac {1}{\sqrt {a+b \cos (c+d x)}}dx}{3 b}+\frac {2 B \left (a^2-b^2\right ) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{3 d}}{b^2 \left (a^2-b^2\right )}-\frac {2 a^2 (A b-a B) \sin (c+d x)}{b^2 d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\left (-8 a^3 B+6 a^2 A b+5 a b^2 B-3 A b^3\right ) \int \sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}dx-\left (a^2-b^2\right ) \left (-8 a^2 B+6 a A b-b^2 B\right ) \int \frac {1}{\sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{3 b}+\frac {2 B \left (a^2-b^2\right ) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{3 d}}{b^2 \left (a^2-b^2\right )}-\frac {2 a^2 (A b-a B) \sin (c+d x)}{b^2 d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3134 |
\(\displaystyle \frac {\frac {\frac {\left (-8 a^3 B+6 a^2 A b+5 a b^2 B-3 A b^3\right ) \sqrt {a+b \cos (c+d x)} \int \sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}dx}{\sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\left (a^2-b^2\right ) \left (-8 a^2 B+6 a A b-b^2 B\right ) \int \frac {1}{\sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{3 b}+\frac {2 B \left (a^2-b^2\right ) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{3 d}}{b^2 \left (a^2-b^2\right )}-\frac {2 a^2 (A b-a B) \sin (c+d x)}{b^2 d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {\left (-8 a^3 B+6 a^2 A b+5 a b^2 B-3 A b^3\right ) \sqrt {a+b \cos (c+d x)} \int \sqrt {\frac {a}{a+b}+\frac {b \sin \left (c+d x+\frac {\pi }{2}\right )}{a+b}}dx}{\sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\left (a^2-b^2\right ) \left (-8 a^2 B+6 a A b-b^2 B\right ) \int \frac {1}{\sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{3 b}+\frac {2 B \left (a^2-b^2\right ) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{3 d}}{b^2 \left (a^2-b^2\right )}-\frac {2 a^2 (A b-a B) \sin (c+d x)}{b^2 d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3132 |
\(\displaystyle \frac {\frac {\frac {2 \left (-8 a^3 B+6 a^2 A b+5 a b^2 B-3 A b^3\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\left (a^2-b^2\right ) \left (-8 a^2 B+6 a A b-b^2 B\right ) \int \frac {1}{\sqrt {a+b \sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{3 b}+\frac {2 B \left (a^2-b^2\right ) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{3 d}}{b^2 \left (a^2-b^2\right )}-\frac {2 a^2 (A b-a B) \sin (c+d x)}{b^2 d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3142 |
\(\displaystyle \frac {\frac {\frac {2 \left (-8 a^3 B+6 a^2 A b+5 a b^2 B-3 A b^3\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {\left (a^2-b^2\right ) \left (-8 a^2 B+6 a A b-b^2 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}}dx}{\sqrt {a+b \cos (c+d x)}}}{3 b}+\frac {2 B \left (a^2-b^2\right ) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{3 d}}{b^2 \left (a^2-b^2\right )}-\frac {2 a^2 (A b-a B) \sin (c+d x)}{b^2 d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {2 \left (-8 a^3 B+6 a^2 A b+5 a b^2 B-3 A b^3\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {\left (a^2-b^2\right ) \left (-8 a^2 B+6 a A b-b^2 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \sin \left (c+d x+\frac {\pi }{2}\right )}{a+b}}}dx}{\sqrt {a+b \cos (c+d x)}}}{3 b}+\frac {2 B \left (a^2-b^2\right ) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{3 d}}{b^2 \left (a^2-b^2\right )}-\frac {2 a^2 (A b-a B) \sin (c+d x)}{b^2 d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
\(\Big \downarrow \) 3140 |
\(\displaystyle \frac {\frac {2 B \left (a^2-b^2\right ) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{3 d}+\frac {\frac {2 \left (-8 a^3 B+6 a^2 A b+5 a b^2 B-3 A b^3\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {2 \left (a^2-b^2\right ) \left (-8 a^2 B+6 a A b-b^2 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{d \sqrt {a+b \cos (c+d x)}}}{3 b}}{b^2 \left (a^2-b^2\right )}-\frac {2 a^2 (A b-a B) \sin (c+d x)}{b^2 d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}\) |
(-2*a^2*(A*b - a*B)*Sin[c + d*x])/(b^2*(a^2 - b^2)*d*Sqrt[a + b*Cos[c + d* x]]) + (((2*(6*a^2*A*b - 3*A*b^3 - 8*a^3*B + 5*a*b^2*B)*Sqrt[a + b*Cos[c + d*x]]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[(a + b*Cos[c + d*x]) /(a + b)]) - (2*(a^2 - b^2)*(6*a*A*b - 8*a^2*B - b^2*B)*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(d*Sqrt[a + b*Cos[ c + d*x]]))/(3*b) + (2*(a^2 - b^2)*B*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x] )/(3*d))/(b^2*(a^2 - b^2))
3.4.27.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[2*(Sqrt[a + b]/d)*EllipticE[(1/2)*(c - Pi/2 + d*x), 2*(b/(a + b))], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && GtQ[a + b, 0]
Int[Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[Sqrt[a + b*Sin[c + d*x]]/Sqrt[(a + b*Sin[c + d*x])/(a + b)] Int[Sqrt[a/(a + b) + ( b/(a + b))*Sin[c + d*x]], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2 , 0] && !GtQ[a + b, 0]
Int[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/(d*S qrt[a + b]))*EllipticF[(1/2)*(c - Pi/2 + d*x), 2*(b/(a + b))], x] /; FreeQ[ {a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && GtQ[a + b, 0]
Int[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[Sqrt[(a + b*Sin[c + d*x])/(a + b)]/Sqrt[a + b*Sin[c + d*x]] Int[1/Sqrt[a/(a + b) + (b/(a + b))*Sin[c + d*x]], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && !GtQ[a + b, 0]
Int[((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])/Sqrt[(a_) + (b_.)*sin[(e_.) + ( f_.)*(x_)]], x_Symbol] :> Simp[(b*c - a*d)/b Int[1/Sqrt[a + b*Sin[e + f*x ]], x], x] + Simp[d/b Int[Sqrt[a + b*Sin[e + f*x]], x], x] /; FreeQ[{a, b , c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^2*((A_.) + (B_.)*sin[(e_.) + (f _.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[ (B*c - A*d)*(b*c - a*d)^2*Cos[e + f*x]*((c + d*Sin[e + f*x])^(n + 1)/(f*d^2 *(n + 1)*(c^2 - d^2))), x] - Simp[1/(d^2*(n + 1)*(c^2 - d^2)) Int[(c + d* Sin[e + f*x])^(n + 1)*Simp[d*(n + 1)*(B*(b*c - a*d)^2 - A*d*(a^2*c + b^2*c - 2*a*b*d)) - ((B*c - A*d)*(a^2*d^2*(n + 2) + b^2*(c^2 + d^2*(n + 1))) + 2* a*b*d*(A*c*d*(n + 2) - B*(c^2 + d^2*(n + 1))))*Sin[e + f*x] - b^2*B*d*(n + 1)*(c^2 - d^2)*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B} , x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[ n, -1]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Leaf count of result is larger than twice the leaf count of optimal. \(1274\) vs. \(2(302)=604\).
Time = 14.82 (sec) , antiderivative size = 1275, normalized size of antiderivative = 4.87
method | result | size |
parts | \(\text {Expression too large to display}\) | \(1275\) |
default | \(\text {Expression too large to display}\) | \(1336\) |
-2*A*(2*cos(1/2*d*x+1/2*c)*sin(1/2*d*x+1/2*c)^2*a^2*b-2*(sin(1/2*d*x+1/2*c )^2)^(1/2)*(-2*b/(a-b)*sin(1/2*d*x+1/2*c)^2+(a+b)/(a-b))^(1/2)*EllipticF(c os(1/2*d*x+1/2*c),(-2*b/(a-b))^(1/2))*a^3+2*a*b^2*(sin(1/2*d*x+1/2*c)^2)^( 1/2)*(-2*b/(a-b)*sin(1/2*d*x+1/2*c)^2+(a+b)/(a-b))^(1/2)*EllipticF(cos(1/2 *d*x+1/2*c),(-2*b/(a-b))^(1/2))+2*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(-2*b/(a-b) *sin(1/2*d*x+1/2*c)^2+(a+b)/(a-b))^(1/2)*EllipticE(cos(1/2*d*x+1/2*c),(-2* b/(a-b))^(1/2))*a^3-2*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(-2*b/(a-b)*sin(1/2*d*x +1/2*c)^2+(a+b)/(a-b))^(1/2)*EllipticE(cos(1/2*d*x+1/2*c),(-2*b/(a-b))^(1/ 2))*a^2*b-(sin(1/2*d*x+1/2*c)^2)^(1/2)*(-2*b/(a-b)*sin(1/2*d*x+1/2*c)^2+(a +b)/(a-b))^(1/2)*EllipticE(cos(1/2*d*x+1/2*c),(-2*b/(a-b))^(1/2))*a*b^2+(s in(1/2*d*x+1/2*c)^2)^(1/2)*(-2*b/(a-b)*sin(1/2*d*x+1/2*c)^2+(a+b)/(a-b))^( 1/2)*EllipticE(cos(1/2*d*x+1/2*c),(-2*b/(a-b))^(1/2))*b^3)/b^2/(a-b)/(a+b) /sin(1/2*d*x+1/2*c)/(-2*b*sin(1/2*d*x+1/2*c)^2+a+b)^(1/2)/d-2/3*B*(4*cos(1 /2*d*x+1/2*c)*sin(1/2*d*x+1/2*c)^4*a^2*b^2-4*cos(1/2*d*x+1/2*c)*sin(1/2*d* x+1/2*c)^4*b^4-8*cos(1/2*d*x+1/2*c)*sin(1/2*d*x+1/2*c)^2*a^3*b-2*cos(1/2*d *x+1/2*c)*sin(1/2*d*x+1/2*c)^2*a^2*b^2+2*cos(1/2*d*x+1/2*c)*sin(1/2*d*x+1/ 2*c)^2*a*b^3+2*cos(1/2*d*x+1/2*c)*sin(1/2*d*x+1/2*c)^2*b^4+8*(sin(1/2*d*x+ 1/2*c)^2)^(1/2)*(-2*b/(a-b)*sin(1/2*d*x+1/2*c)^2+(a+b)/(a-b))^(1/2)*Ellipt icF(cos(1/2*d*x+1/2*c),(-2*b/(a-b))^(1/2))*a^4-7*(sin(1/2*d*x+1/2*c)^2)^(1 /2)*(-2*b/(a-b)*sin(1/2*d*x+1/2*c)^2+(a+b)/(a-b))^(1/2)*EllipticF(cos(1...
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.17 (sec) , antiderivative size = 789, normalized size of antiderivative = 3.01 \[ \int \frac {\cos ^2(c+d x) (A+B \cos (c+d x))}{(a+b \cos (c+d x))^{3/2}} \, dx=\frac {6 \, {\left (4 \, B a^{3} b^{2} - 3 \, A a^{2} b^{3} - B a b^{4} + {\left (B a^{2} b^{3} - B b^{5}\right )} \cos \left (d x + c\right )\right )} \sqrt {b \cos \left (d x + c\right ) + a} \sin \left (d x + c\right ) - {\left (\sqrt {2} {\left (16 i \, B a^{4} b - 12 i \, A a^{3} b^{2} - 16 i \, B a^{2} b^{3} + 15 i \, A a b^{4} - 3 i \, B b^{5}\right )} \cos \left (d x + c\right ) + \sqrt {2} {\left (16 i \, B a^{5} - 12 i \, A a^{4} b - 16 i \, B a^{3} b^{2} + 15 i \, A a^{2} b^{3} - 3 i \, B a b^{4}\right )}\right )} \sqrt {b} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) + 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right ) - {\left (\sqrt {2} {\left (-16 i \, B a^{4} b + 12 i \, A a^{3} b^{2} + 16 i \, B a^{2} b^{3} - 15 i \, A a b^{4} + 3 i \, B b^{5}\right )} \cos \left (d x + c\right ) + \sqrt {2} {\left (-16 i \, B a^{5} + 12 i \, A a^{4} b + 16 i \, B a^{3} b^{2} - 15 i \, A a^{2} b^{3} + 3 i \, B a b^{4}\right )}\right )} \sqrt {b} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) - 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right ) + 3 \, {\left (\sqrt {2} {\left (-8 i \, B a^{3} b^{2} + 6 i \, A a^{2} b^{3} + 5 i \, B a b^{4} - 3 i \, A b^{5}\right )} \cos \left (d x + c\right ) + \sqrt {2} {\left (-8 i \, B a^{4} b + 6 i \, A a^{3} b^{2} + 5 i \, B a^{2} b^{3} - 3 i \, A a b^{4}\right )}\right )} \sqrt {b} {\rm weierstrassZeta}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) + 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right )\right ) + 3 \, {\left (\sqrt {2} {\left (8 i \, B a^{3} b^{2} - 6 i \, A a^{2} b^{3} - 5 i \, B a b^{4} + 3 i \, A b^{5}\right )} \cos \left (d x + c\right ) + \sqrt {2} {\left (8 i \, B a^{4} b - 6 i \, A a^{3} b^{2} - 5 i \, B a^{2} b^{3} + 3 i \, A a b^{4}\right )}\right )} \sqrt {b} {\rm weierstrassZeta}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) - 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right )\right )}{9 \, {\left ({\left (a^{2} b^{5} - b^{7}\right )} d \cos \left (d x + c\right ) + {\left (a^{3} b^{4} - a b^{6}\right )} d\right )}} \]
1/9*(6*(4*B*a^3*b^2 - 3*A*a^2*b^3 - B*a*b^4 + (B*a^2*b^3 - B*b^5)*cos(d*x + c))*sqrt(b*cos(d*x + c) + a)*sin(d*x + c) - (sqrt(2)*(16*I*B*a^4*b - 12* I*A*a^3*b^2 - 16*I*B*a^2*b^3 + 15*I*A*a*b^4 - 3*I*B*b^5)*cos(d*x + c) + sq rt(2)*(16*I*B*a^5 - 12*I*A*a^4*b - 16*I*B*a^3*b^2 + 15*I*A*a^2*b^3 - 3*I*B *a*b^4))*sqrt(b)*weierstrassPInverse(4/3*(4*a^2 - 3*b^2)/b^2, -8/27*(8*a^3 - 9*a*b^2)/b^3, 1/3*(3*b*cos(d*x + c) + 3*I*b*sin(d*x + c) + 2*a)/b) - (s qrt(2)*(-16*I*B*a^4*b + 12*I*A*a^3*b^2 + 16*I*B*a^2*b^3 - 15*I*A*a*b^4 + 3 *I*B*b^5)*cos(d*x + c) + sqrt(2)*(-16*I*B*a^5 + 12*I*A*a^4*b + 16*I*B*a^3* b^2 - 15*I*A*a^2*b^3 + 3*I*B*a*b^4))*sqrt(b)*weierstrassPInverse(4/3*(4*a^ 2 - 3*b^2)/b^2, -8/27*(8*a^3 - 9*a*b^2)/b^3, 1/3*(3*b*cos(d*x + c) - 3*I*b *sin(d*x + c) + 2*a)/b) + 3*(sqrt(2)*(-8*I*B*a^3*b^2 + 6*I*A*a^2*b^3 + 5*I *B*a*b^4 - 3*I*A*b^5)*cos(d*x + c) + sqrt(2)*(-8*I*B*a^4*b + 6*I*A*a^3*b^2 + 5*I*B*a^2*b^3 - 3*I*A*a*b^4))*sqrt(b)*weierstrassZeta(4/3*(4*a^2 - 3*b^ 2)/b^2, -8/27*(8*a^3 - 9*a*b^2)/b^3, weierstrassPInverse(4/3*(4*a^2 - 3*b^ 2)/b^2, -8/27*(8*a^3 - 9*a*b^2)/b^3, 1/3*(3*b*cos(d*x + c) + 3*I*b*sin(d*x + c) + 2*a)/b)) + 3*(sqrt(2)*(8*I*B*a^3*b^2 - 6*I*A*a^2*b^3 - 5*I*B*a*b^4 + 3*I*A*b^5)*cos(d*x + c) + sqrt(2)*(8*I*B*a^4*b - 6*I*A*a^3*b^2 - 5*I*B* a^2*b^3 + 3*I*A*a*b^4))*sqrt(b)*weierstrassZeta(4/3*(4*a^2 - 3*b^2)/b^2, - 8/27*(8*a^3 - 9*a*b^2)/b^3, weierstrassPInverse(4/3*(4*a^2 - 3*b^2)/b^2, - 8/27*(8*a^3 - 9*a*b^2)/b^3, 1/3*(3*b*cos(d*x + c) - 3*I*b*sin(d*x + c) ...
Timed out. \[ \int \frac {\cos ^2(c+d x) (A+B \cos (c+d x))}{(a+b \cos (c+d x))^{3/2}} \, dx=\text {Timed out} \]
\[ \int \frac {\cos ^2(c+d x) (A+B \cos (c+d x))}{(a+b \cos (c+d x))^{3/2}} \, dx=\int { \frac {{\left (B \cos \left (d x + c\right ) + A\right )} \cos \left (d x + c\right )^{2}}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {3}{2}}} \,d x } \]
\[ \int \frac {\cos ^2(c+d x) (A+B \cos (c+d x))}{(a+b \cos (c+d x))^{3/2}} \, dx=\int { \frac {{\left (B \cos \left (d x + c\right ) + A\right )} \cos \left (d x + c\right )^{2}}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {3}{2}}} \,d x } \]
Timed out. \[ \int \frac {\cos ^2(c+d x) (A+B \cos (c+d x))}{(a+b \cos (c+d x))^{3/2}} \, dx=\int \frac {{\cos \left (c+d\,x\right )}^2\,\left (A+B\,\cos \left (c+d\,x\right )\right )}{{\left (a+b\,\cos \left (c+d\,x\right )\right )}^{3/2}} \,d x \]